import { defineStore } from 'pinia';

// export const useEnterpriseDocStore = defineStore('enterpriseDoc',{
//     const state = reactive({
//         row: {}
//     }),

//     actions: {

//     }
// );
// 定义 userStore
export const useEnterpriseDocStore = defineStore('enterpriseDoc', {
    state: () => {
        // State
        // row: null,
        const row = JSON.parse(localStorage.getItem('qyDocRow') || '{}');
        return {
            row,
        }
    },
    actions: {
        // Actions
        updateRow(row: any): void {
            this.row = row;
            localStorage.setItem('qyDocRow', JSON.stringify(row));
        },
    },
});